//
//  HomeDataTool.h
//  JiaoX
//
//  Created by jiaoxiu－004 on 14/11/12.
//  Copyright (c) 2014年 北京娇羞科技有限公司. All rights reserved.
//

#import "JXBaseTool.h"
@class HomeDataInfo;
@class JXAppInfo;
@class HomeTabInfo;
@class ReviewsResult;
@class ShakeList;
@class JXBaseResponse;
@class CommentInfo;
@class ProductDetail;
@class ProdComtList;
@class Shake;
@class HomeFirstPageInfo;

@interface HomeDataTool : JXBaseTool
/**
 *  加载首页的数据
 *
 *  @param param   请求参数
 *  @param success 请求成功后的回调（请将请求成功后想做的事情写到这个block中）
 *  @param failure 请求失败后的回调（请将请求失败后想做的事情写到这个block中）
 */
+ (void)homeOldDataInfoWithParam:(NSDictionary *)param success:(void (^)(HomeDataInfo *result))success failure:(void (^)(NSError *error))failure;
+ (void)homeDataInfoWithParam:(NSDictionary *)param success:(void (^)(HomeTabInfo *result))success failure:(void (^)(NSError *error))failure;
+ (void)appInfo:(void (^)(JXAppInfo *result))success failure:(void (^)(NSError *error))failure;
+ (void)reviewsDataWithId:(NSString *)reviewsId lastComtId:(NSString *)lastComtId success:(void (^)(ReviewsResult *result))success failure:(void (^)(NSError *error))failure;
/**
 *  回复评论
 *
 *  @param replyUrl     回复的url:[商品评论=product/recomment][评测评论=reviews/recomment][帖子评论=forum/recomment]
 *  @param replyType    回复类型:prodId(代表是商品id)，reviewsId(代表的是评测id),postsId(代表的是帖子)
 *  @param replyMainId  商品id或者 评测id 或者帖子id
 *  @param commentId    主评论的id
 *  @param replyContent 评论内容
 *  @param userIdOther  被评论人的id，如果为空，代表回复的是主评论或者直接回复
 *  @param commentType  回复的类型：0代表回复的是帖子，1代表回复的是主评论，2代表回复的是子评论
 *  @param success      回复成功的回调
 *  @param failure      回复失败的回调
 */
+ (void)replyCommentWithReplyUrl:(NSString *)replyUrl ReplyType:(NSString *)replyType replyMainId:(NSString *)replyMainId commentId:(NSString *)commentId replyContent:(NSString *)replyContent userIdOther:(NSString *)userIdOther commentType:(NSString *)commentType success:(void (^)(CommentInfo *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取商品详情
 *
 *  @param prodId  商品id
 *  @param success
 *  @param failure
 */
+ (void)getProdDetailWithProdId:(NSString *)prodId success:(void (^)(ProductDetail *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取商品评论列表
 *
 *  @param prodId     商品id
 *  @param lastComtId 最后一个评论id
 *  @param success
 *  @param failure
 */
+ (void)getProdComtListWithProdId:(NSString *)prodId lastComtId:(NSString *)lastComtId success:(void (^)(ProdComtList *result))success failure:(void (^)(NSError *error))failure;
/**
 *  收藏商品
 *
 *  @param prodId  商品id
 *  @param isMark  收藏或者取消收藏
 *  @param success
 *  @param failure
 */
+ (void)collectProdWithProdId:(NSString *)prodId isMark:(BOOL)isMark success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  评测点赞
 *
 *  @param reviewsId 评测id
 *  @param success
 *  @param failure
 */
+(void)doPraiseWithReviewsId:(NSString *)reviewsId success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取firstpage info
 *
 *  @param success
 *  @param failure
 */
+(void)getFirstHomePageData:(void (^)(HomeFirstPageInfo *result))success failure:(void (^)(NSError *error))failure;

/**
 *  向服务器提交idfa
 *
 *  @param idfa
 */
+(void)setADIDFA:(NSString *)idfa;


+(void)getSunSignleWithSunSingleId:(NSString *)sunSingleId productId:(NSString *)productId createTime:(NSString *)createTime success:(void (^)(HomeTabInfo *result))success failure:(void (^)(NSError *error))failure;


/**
 *  收藏商品
 *
 *  @param prodIds  prodIds 多个 用逗号分开
 *  @param success
 *  @param failure
 */
+ (void)delMarkProdWithProdIds:(NSString *)prodIds success:(void (^)(JXBaseResponse *result))success failure:(void (^)(NSError *error))failure;

/**
 *  获取别人摇到了什么
 *
 *  @param success
 *  @param failure
 */
+ (void)getUserShakeList:(void(^)(ShakeList *result))success failure:(void (^)(NSError *error))failure;

/**
 *  摇一摇
 *
 *  @param success
 *  @param failure
 */
+ (void)userShake:(void(^)(Shake *result))success failure:(void (^)(NSError *error))failure;


@end
